//
//  APPhotoLibrary.swift
//  APSwift
//
//  Created by jianbo.pei on 2022/4/10.
//

import UIKit
import Photos

class APPhotoLibrary: NSObject {
    static let shared = APPhotoLibrary()
    private override init() { }
    
    /// 用户还没有选择授权
    public var isNotDetermined: Bool {
        get {
            if #available(iOS 14, *) {
                return PHPhotoLibrary.authorizationStatus(for: .readWrite) == .notDetermined
            } else {
                return PHPhotoLibrary.authorizationStatus() == .notDetermined
            }
        }
    }
}
